<?php
//YHM Database Inserts

$create1 = "CREATE TABLE `".$prefix."announcements` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(225) NOT NULL,
  `message` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";

$create2 = "CREATE TABLE `".$prefix."countries` (
  `id` int(11) NOT NULL auto_increment,
  `code` varchar(2) NOT NULL,
  `name` varchar(225) NOT NULL,
  `isdefault` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;

INSERT INTO `".$prefix."countries` (`id`, `code`, `name`, `isdefault`) VALUES
(1, 'AF', 'Afghanistan', 0),
(2, 'AX', '&Aring;land Islands', 0),
(3, 'AL', 'Albania', 0),
(4, 'DZ', 'Algeria', 0),
(5, 'AS', 'American Samoa', 0),
(6, 'AD', 'Andorra', 0),
(7, 'AO', 'Angola', 0),
(8, 'AI', 'Anguilla', 0),
(9, 'AQ', 'Antarctica', 0),
(10, 'AG', 'Antigua and Barbuda', 0),
(11, 'AR', 'Argentina', 0),
(12, 'AM', 'Armenia', 0),
(13, 'AW', 'Aruba', 0),
(14, 'AU', 'Australia', 0),
(15, 'AT', 'Austria', 0),
(16, 'AZ', 'Azerbaijan', 0),
(17, 'BS', 'Bahamas', 0),
(18, 'BH', 'Bahrain', 0),
(19, 'BD', 'Bangladesh', 0),
(20, 'BB', 'Barbados', 0),
(21, 'BY', 'Belarus', 0),
(22, 'BE', 'Belgium', 0),
(23, 'BZ', 'Belize', 0),
(24, 'BJ', 'Benin', 0),
(25, 'BM', 'Bermuda', 0),
(26, 'BT', 'Bhutan', 0),
(27, 'BO', 'Bolivia', 0),
(28, 'BA', 'Bosnia and Herzegovina', 0),
(29, 'BW', 'Botswana', 0),
(30, 'BV', 'Bouvet Island', 0),
(31, 'BR', 'Brazil', 0),
(32, 'IO', 'British Indian Ocean Territory', 0),
(33, 'BN', 'Brunei Darussalam', 0),
(34, 'BG', 'Bulgaria', 0),
(35, 'BF', 'Burkina Faso', 0),
(36, 'BI', 'Burundi', 0),
(37, 'KH', 'Cambodia', 0),
(38, 'CM', 'Cameroon', 0),
(39, 'CA', 'Canada', 0),
(40, 'CV', 'Cape Verde', 0),
(41, 'KY', 'Cayman Islands', 0),
(42, 'CF', 'Central African Republic', 0),
(43, 'TD', 'Chad', 0),
(44, 'CL', 'Chile', 0),
(45, 'CN', 'China', 0),
(46, 'CX', 'Christmas Island', 0),
(47, 'CC', 'Cocos (Keeling) Islands', 0),
(48, 'CO', 'Colombia', 0),
(49, 'KM', 'Comoros', 0),
(50, 'CG', 'Congo', 0),
(51, 'CD', 'Congo, The Democratic Republic of the', 0),
(52, 'CK', 'Cook Islands', 0),
(53, 'CR', 'Costa Rica', 0),
(54, 'CI', 'C&ocirc;te D''Ivoire', 0),
(55, 'HR', 'Croatia', 0),
(56, 'CU', 'Cuba', 0),
(57, 'CY', 'Cyprus', 0),
(58, 'CZ', 'Czech Republic', 0),
(59, 'DK', 'Denmark', 0),
(60, 'DJ', 'Djibouti', 0),
(61, 'DM', 'Dominica', 0),
(62, 'DO', 'Dominican Republic', 0),
(63, 'EC', 'Ecuador', 0),
(64, 'EG', 'Egypt', 0),
(65, 'SV', 'El Salvador', 0),
(66, 'GQ', 'Equatorial Guinea', 0),
(67, 'ER', 'Eritrea', 0),
(68, 'EE', 'Estonia', 0),
(69, 'ET', 'Ethiopia', 0),
(70, 'FK', 'Falkland Islands (Malvinas)', 0),
(71, 'FO', 'Faroe Islands', 0),
(72, 'FJ', 'Fiji', 0),
(73, 'FI', 'Finland', 0),
(74, 'FR', 'France', 0),
(75, 'GF', 'French Guiana', 0),
(76, 'PF', 'French Polynesia', 0),
(77, 'TF', 'French Southern Territories', 0),
(78, 'GA', 'Gabon', 0),
(79, 'GM', 'Gambia', 0),
(80, 'GE', 'Georgia', 0),
(81, 'DE', 'Germany', 0),
(82, 'GH', 'Ghana', 0),
(83, 'GI', 'Gibraltar', 0),
(84, 'GR', 'Greece', 0),
(85, 'GL', 'Greenland', 0),
(86, 'GD', 'Grenada', 0),
(87, 'GP', 'Guadeloupe', 0),
(88, 'GU', 'Guam', 0),
(89, 'GT', 'Guatemala', 0),
(90, 'GG', 'Guernsey', 0),
(91, 'GN', 'Guinea', 0),
(92, 'GW', 'Guinea-Bissau', 0),
(93, 'GY', 'Guyana', 0),
(94, 'HT', 'Haiti', 0),
(95, 'HM', 'Heard Island and McDonald Islands', 0),
(96, 'VA', 'Holy See (Vatican City State)', 0),
(97, 'HN', 'Honduras', 0),
(98, 'HK', 'Hong Kong', 0),
(99, 'HU', 'Hungary', 0),
(100, 'IS', 'Iceland', 0),
(101, 'IN', 'India', 0),
(102, 'ID', 'Indonesia', 0),
(103, 'IR', 'Iran, Islamic Republic of', 0),
(104, 'IQ', 'Iraq', 0),
(105, 'IE', 'Ireland', 0),
(106, 'IM', 'Isle of Man', 0),
(107, 'IL', 'Israel', 0),
(108, 'IT', 'Italy', 0),
(109, 'JM', 'Jamaica', 0),
(110, 'JP', 'Japan', 0),
(111, 'JE', 'Jersey', 0),
(112, 'JO', 'Jordan', 0),
(113, 'KZ', 'Kazakhstan', 0),
(114, 'KE', 'Kenya', 0),
(115, 'KI', 'Kiribati', 0),
(116, 'KP', 'Korea, Democratic People''s Republic of', 0),
(117, 'KR', 'Korea, Republic of', 0),
(118, 'KW', 'Kuwait', 0),
(119, 'KG', 'Kyrgyzstan', 0),
(120, 'LA', 'Lao People''s Democratic Republic', 0),
(121, 'LV', 'Latvia', 0),
(122, 'LB', 'Lebanon', 0),
(123, 'LS', 'Lesotho', 0),
(124, 'LR', 'Liberia', 0),
(125, 'LY', 'Libyan Arab Jamahiriya', 0),
(126, 'LI', 'Liechtenstein', 0),
(127, 'LT', 'Lithuania', 0),
(128, 'LU', 'Luxembourg', 0),
(129, 'MO', 'Macao', 0),
(130, 'MK', 'Macedonia, The Former Yugoslav Republic of', 0),
(131, 'MG', 'Madagascar', 0),
(132, 'MW', 'Malawi', 0),
(133, 'MY', 'Malaysia', 0),
(134, 'MV', 'Maldives', 0),
(135, 'ML', 'Mali', 0),
(136, 'MT', 'Malta', 0),
(137, 'MH', 'Marshall Islands', 0),
(138, 'MQ', 'Martinique', 0),
(139, 'MR', 'Mauritania', 0),
(140, 'MU', 'Mauritius', 0),
(141, 'YT', 'Mayotte', 0),
(142, 'MX', 'Mexico', 0),
(143, 'FM', 'Micronesia, Federated States of', 0),
(144, 'MD', 'Moldova, Republic of', 0),
(145, 'MC', 'Monaco', 0),
(146, 'MN', 'Mongolia', 0),
(147, 'ME', 'Montenegro', 0),
(148, 'MS', 'Montserrat', 0),
(149, 'MA', 'Morocco', 0),
(150, 'MZ', 'Mozambique', 0),
(151, 'MM', 'Myanmar', 0),
(152, 'NA', 'Namibia', 0),
(153, 'NR', 'Nauru', 0),
(154, 'NP', 'Nepal', 0),
(155, 'NL', 'Netherlands', 0),
(156, 'AN', 'Netherlands Antilles', 0),
(157, 'NC', 'New Caledonia', 0),
(158, 'NZ', 'New Zealand', 0),
(159, 'NI', 'Nicaragua', 0),
(160, 'NE', 'Niger', 0),
(161, 'NG', 'Nigeria', 0),
(162, 'NU', 'Niue', 0),
(163, 'NF', 'Norfolk Island', 0),
(164, 'MP', 'Northern Mariana Islands', 0),
(165, 'NO', 'Norway', 0),
(166, 'OM', 'Oman', 0),
(167, 'PK', 'Pakistan', 0),
(168, 'PW', 'Palau', 0),
(169, 'PS', 'Palestinian Territory, Occupied', 0),
(170, 'PA', 'Panama', 0),
(171, 'PG', 'Papua New Guinea', 0),
(172, 'PY', 'Paraguay', 0),
(173, 'PE', 'Peru', 0),
(174, 'PH', 'Philippines', 0),
(175, 'PN', 'Pitcairn', 0),
(176, 'PL', 'Poland', 0),
(177, 'PT', 'Portugal', 0),
(178, 'PR', 'Puerto Rico', 0),
(179, 'QA', 'Qatar', 0),
(180, 'RE', 'Reunion', 0),
(181, 'RO', 'Romania', 0),
(182, 'RU', 'Russian Federation', 0),
(183, 'RW', 'Rwanda', 0),
(184, 'BL', 'Saint Barth&eacute;lemy', 0),
(185, 'SH', 'Saint Helena', 0),
(186, 'KN', 'Saint Kitts and Nevis', 0),
(187, 'LC', 'Saint Lucia', 0),
(188, 'MF', 'Saint Martin', 0),
(189, 'PM', 'Saint Pierre and Miquelon', 0),
(190, 'VC', 'Saint Vincent and the Grenadines', 0),
(191, 'WS', 'Samoa', 0),
(192, 'SM', 'San Marino', 0),
(193, 'ST', 'Sao Tome and Principe', 0),
(194, 'SA', 'Saudi Arabia', 0),
(195, 'SN', 'Senegal', 0),
(196, 'RS', 'Serbia', 0),
(197, 'SC', 'Seychelles', 0),
(198, 'SL', 'Sierra Leone', 0),
(199, 'SG', 'Singapore', 0),
(200, 'SK', 'Slovakia', 0),
(201, 'SI', 'Slovenia', 0),
(202, 'SB', 'Solomon Islands', 0),
(203, 'SO', 'Somalia', 0),
(204, 'ZA', 'South Africa', 0),
(205, 'GS', 'South Georgia and the South Sandwich Islands', 0),
(206, 'ES', 'Spain', 0),
(207, 'LK', 'Sri Lanka', 0),
(208, 'SD', 'Sudan', 0),
(209, 'SR', 'Suriname', 0),
(210, 'SJ', 'Svalbard and Jan Mayen', 0),
(211, 'SZ', 'Swaziland', 0),
(212, 'SE', 'Sweden', 0),
(213, 'CH', 'Switzerland', 0),
(214, 'SY', 'Syrian Arab Republic', 0),
(215, 'TW', 'Taiwan, Province Of China', 0),
(216, 'TJ', 'Tajikistan', 0),
(217, 'TZ', 'Tanzania, United Republic of', 0),
(218, 'TH', 'Thailand', 0),
(219, 'TL', 'Timor-Leste', 0),
(220, 'TG', 'Togo', 0),
(221, 'TK', 'Tokelau', 0),
(222, 'TO', 'Tonga', 0),
(223, 'TT', 'Trinidad and Tobago', 0),
(224, 'TN', 'Tunisia', 0),
(225, 'TR', 'Turkey', 0),
(226, 'TM', 'Turkmenistan', 0),
(227, 'TC', 'Turks and Caicos Islands', 0),
(228, 'TV', 'Tuvalu', 0),
(229, 'UG', 'Uganda', 0),
(230, 'UA', 'Ukraine', 0),
(231, 'AE', 'United Arab Emirates', 0),
(232, 'GB', 'United Kingdom', 1),
(233, 'US', 'United States', 0),
(234, 'UM', 'United States Minor Outlying Islands', 0),
(235, 'UY', 'Uruguay', 0),
(236, 'UZ', 'Uzbekistan', 0),
(237, 'VU', 'Vanuatu', 0),
(238, 'VE', 'Venezuela', 0),
(239, 'VN', 'Viet Nam', 0),
(240, 'VG', 'Virgin Islands, British', 0),
(241, 'VI', 'Virgin Islands, U.S.', 0),
(242, 'WF', 'Wallis And Futuna', 0),
(243, 'EH', 'Western Sahara', 0),
(244, 'YE', 'Yemen', 0),
(245, 'ZM', 'Zambia', 0),
(246, 'ZW', 'Zimbabwe', 0);";

$create3 = "CREATE TABLE `".$prefix."knowledgebase` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(225) NOT NULL,
  `content` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";

$create4 = "CREATE TABLE `".$prefix."packagegroups` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(225) NOT NULL,
  `status` tinyint(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";

$create5 = "CREATE TABLE `".$prefix."packages` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(225) NOT NULL,
  `whmname` varchar(225) NOT NULL,
  `description` text NOT NULL,
  `type` tinyint(1) NOT NULL,
  `pkggroup` int(11) NOT NULL,
  `status` tinyint(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";

$create6 = "CREATE TABLE `".$prefix."servers` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(225) NOT NULL,
  `user` varchar(32) NOT NULL,
  `hash` text NOT NULL,
  `hostname` varchar(225) NOT NULL,
  `ns1` varchar(225) NOT NULL,
  `ns2` varchar(225) NOT NULL,
  `status` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";

$create7 = "CREATE TABLE `".$prefix."settings` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL,
  `acpname` varchar(200) NOT NULL,
  `desc` varchar(500) NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM;

INSERT INTO `".$prefix."settings` (`id`, `name`, `acpname`, `desc`, `value`) VALUES
(1, 'title', 'Title', 'This is the title that will be shown on most pages.', ''),
(2, 'url', 'Install URL', 'This should be the full path to your YHM install (without the trailing slash).', ''),
(3, 'sendmail', 'From Email', 'This is the email address that YHM will send emails from.', ''),
(4, 'index_redirect', 'Index Redirect', 'This is the place that the index page will redirect to.', 'login'),
(5, 'lang', 'Language', 'This is the language that will be used around your YHM install.', 'en'),
(6, 'theme', 'YHM Theme', 'This setting allows you to select the theme that will be used.', '1'),
(7, 'signups', 'Allow Signups?', 'Do you want to allow users to signup for your hosting?', '1'),
(8, 'tos', 'Terms of Service', 'These are the terms that users have to agree to before registering.', 'These are the terms of service.'),
(9, 'free_activation', 'Free Activation Method', 'How do you want free users'' accounts to be activated?', 'auto'),
(10, 'p2h_activation', 'Post 2 Host Activation Method', 'How do you want post 2 host users'' accounts to be activated?', 'auto'),
(11, 'p2h_field', 'Post 2 Host Field', 'This is the database field that YHM will use (for advanced users only).', 'post');";

$create8 = "CREATE TABLE `".$prefix."subdomains` (
  `id` int(11) NOT NULL auto_increment,
  `domain` varchar(225) NOT NULL,
  `sid` int(11) NOT NULL,
  `status` tinyint(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";

$create9 = "CREATE TABLE `".$prefix."tickets` (
  `id` int(11) NOT NULL auto_increment,
  `date` date NOT NULL,
  `title` varchar(120) NOT NULL,
  `message` text NOT NULL,
  `author` varchar(120) NOT NULL,
  `gid` tinyint(3) NOT NULL,
  `status` tinyint(3) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";

$create10 = "CREATE TABLE `".$prefix."users` (
  `id` int(11) NOT NULL auto_increment,
  `username` varchar(65) NOT NULL,
  `password` varchar(65) NOT NULL,
  `salt` varchar(225) NOT NULL,
  `email` varchar(225) NOT NULL,
  `gid` tinyint(1) NOT NULL,
  `activationkey` varchar(10) NOT NULL,
  `name` varchar(225) NOT NULL,
  `address` text NOT NULL,
  `state` varchar(225) NOT NULL,
  `country` varchar(225) NOT NULL,
  `zip` varchar(10) NOT NULL,
  `phone` varchar(16) NOT NULL,
  `status` tinyint(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;";
?>